# load data
morse_mn1910<-read_csv("MN_MORSE_EDstreet_dict_1910.csv") 
mn_original<-read_csv("MN_EDDictionary.csv") %>% select(-X1)
morse_bk1910<-read_csv("BK_MORSE_EDstreet_dict_1910.csv")
bk_original<-read_xlsx("BK_EDDictionary.xlsx")
morse_mn1910<-as.data.frame(sapply(morse_mn1910, toupper)) 
morse_bk1910<-as.data.frame(sapply(morse_bk1910, toupper))
morse_mn1910$ED<-as.numeric(as.character(morse_mn1910$ED))
morse_bk1910$ED<-as.numeric(as.character(morse_bk1910$ED))

clean strings


str_clean_streets<-function(x){
  x<-gsub("\\<SRT\\>$|\\<SR\\>$\\<SRT\\>$|\\<STR\\>$|\\<SST\\>$|\\<SEET\\>$|\\<TREET\\>$|\\<SHEER\\>$|\\<SHEE\\>$|\\<STREE\\>$|\\<SREET\\>$|\\<REET\\>$|\\<STEE\\>$|\\<ST\\>$","STREET",x)
  x<-gsub("\\<N\\>","NORTH",x)
  x<-gsub("\\<S\\>","SOUTH",x)
  x<-gsub("\\<E\\>","EAST",x)
  x<-gsub("\\<W\\>","WEST",x)
  x<-gsub("\\<DR\\>|\\<DV\\>|\\<DE\\>$|\\<DRV\\>|\\<DRI\\>|\\<DRIV\\>|\\<DRIE\\>","DRIVE",x) 
  x<-gsub("\\<CIR\\>|\\<CRL\\>|\\<CIRC\\>|\\<CR\\>|\\<CL\\>|\\<CIRCL\\>|\\<CICLE\\>","CIRCLE",x)
  x<-gsub("\\<AVE\\>|\\<AV\\>|\\<AVN\\>|\\<AVEN\\>|\\<AVENU\\>","AVENUE",x)
  x<-gsub("\\<CT\\>|\\<CRT\\>|\\<CTR\\>|\\<COUR\\>|\\<COT\\>|\\<CORT\\>","COURT",x)
  x<-gsub("\\<BLVD\\>|\\<BVLD\\>|\\<BV\\>|\\<BLD\\>|\\<BD\\>|\\<BL\\>|\\<BLV\\>","BOULEVARD",x)
  x<-gsub("\\<RD\\>|\\<RAD\\>|\\<ROD\\>","ROAD",x)
  x<-gsub("\\<ALY\\>|\\<AL\\>|\\<ALLY\\>|\\<ALEY\\>|\\<ALLE\\>|\\<AY\\>","ALLEY",x)
  x<-gsub("\\<PL\\>|\\<PLC\\>|\\<PLE\\>|\\<PC\\>|\\<PLAC\\>|\\<PLCE\\>|\\<PCE\\>","PLACE",x)
  x<-gsub("\\<PK\\>|\\<PRK\\>|\\<PRAK\\>|\\<PAK\\>","PARK",x)
  x<-gsub("\\<PKWY\\>|\\<PARKW\\>|\\<PWY\\>|\\<PKW\\>|\\<PRKWY\\>|\\<PKWY\\>|\\<PKW\\>","PARKWAY",x)
  x<-gsub("\\<APPR\\>|\\<APR\\>|\\<APPROA\\>|\\<APRCH\\>|\\<APPRCH\\>","APPROACH",x)
  x<-gsub("\\<TER\\>|\\<TERR\\>|\\<TRC\\>|\\<TRCE\\>|\\<TR\\>","TERRACE",x)
  x<-gsub("\\<PLZ\\>|\\<PLAZ\\>|\\<PZ\\>|\\<PLZA\\>","PLAZA",x)
  x<-gsub("\\<LN\\>|\\<LNE\\>|\\<LAN\\>","LANE",x)
  x<-gsub("\\<BRG\\>|\\<BRGD\\>|\\<BGE\\>","BRIDGE",x)
  x<-gsub("\\<HL\\>|\\<HLL\\>|\\<HIL\\>","HILL",x)
  x<-gsub("\\<HTS\\>|\\<HT\\>|\\<HEIGHT\\>|\\<HEGHTS\\>|\\<HHT\\>|\\<HEIGT\\>","HEIGHTS",x) 
  x<-gsub(".*\\((.*)\\).*", "\\1", x)
  x<-str_remove(x,"STREET")
  x<-gsub("\\d+\\ - *\\d*|\\d+\\ TO *\\d*|\\d+\\-\\d*","",x) #remove addresses
  

  ## dealing with numbered streets
x<-gsub("(\\d)(ST|ND|RD|TH)\\b", "\\1", x)
x<-str_remove(x, "(?<=[0-9])(ST|ND|RD|TH)")
x<-gsub("\\<ONE HUNDRED\\>|\\<ONEHUNDRED\\>|\\<HUNDRED\\>|\\<HUDRED\\>|\\<HUNDED\\>","1",x) 
x<-gsub("\\<TWO HUNDRED\\>|\\<TWOHUNDRED\\>","2",x)
x<-gsub("-"," ",x)
x<-gsub("\\<AND\\>"," ",x)
x<-gsub("&"," ",x)
x<-gsub("\\<1ST\\>|\\b1\\b","FIRST",x)
x<-gsub("\\<2ND\\>|\\b2\\b","SECOND",x)
x<-gsub("\\<3RD\\>|\\b3\\b","THIRD",x)
x<-gsub("\\<4TH\\>|\\b4\\b","FOURTH",x)
x<-gsub("\\<5TH\\>|\\b5\\b","FIFTH",x)
x<-gsub("\\<6TH\\>|\\b6\\b","SIXTH",x)
x<-gsub("\\<7TH\\>|\\b7\\b","SEVENTH",x)
x<-gsub("\\<8TH\\>|\\b8\\b","EIGHTH",x)
x<-gsub("\\<9TH\\>|\\b9\\b","NINTH",x)
x<-gsub("\\<10TH\\>|\\b10\\b","TENTH",x)
x<-gsub("\\<11TH\\>|\\b11\\b","ELEVENTH",x)
x<-gsub("\\<12TH\\>|\\b12\\b","TWELFTH",x)
x<-gsub("\\<13TH\\>|\\b13\\b","THIRTEENTH",x)
x<-gsub("\\<14TH\\>|\\b14\\b","FORTEENTH",x)
x<-gsub("\\<15TH\\>|\\b15\\b","FIFTEENTH",x)
x<-gsub("\\<16TH\\>|\\b16\\b","SIXTEENTH",x)
x<-gsub("\\<17TH\\>|\\b17\\b","SEVENTEENTH",x)
x<-gsub("\\<18TH\\>|\\b18\\b","EIGHTEENTH",x)
x<-gsub("\\<19TH\\>|\\b19\\b","NINETEENTH",x)


x<-gsub("\\<TWENTY\\>|\\<TWENTI\\>|\\<TENTI\\>","2",x)
x<-gsub("\\<THIRTY\\>|\\<THIRTHY\\>|\\<THIRTEY\\>|\\<TIRTY\\>|\\<TRITHY\\>","3",x)
x<-gsub("\\<FORTY\\>|\\<FOURTY\\>|\\<FOURTHY\\>|\\<FRTY\\>","4",x)
x<-gsub("\\<FIFTY\\>|\\<FIFTEY\\>|\\<FIFT\\>|\\<FITY\\>|\\<FIFTHY\\>","5",x)
x<-gsub("\\<SIXTY\\>|\\<SXTY\\>|\\<SIXY\\>|\\<SXTY\\>|\\<SIXTHY\\>|\\<SIXTEY\\>","6",x)
x<-gsub("\\<SEVENT\\>|\\<SEVENTY\\>|\\<SEVENTEY\\>|\\<SVENTY\\>|\\<SEVENTI\\>","7",x)
x<-gsub("\\<EIGHTY\\>|\\<EIGHTEY\\>|\\<EIGHTE\\>","8",x)
x<-gsub("\\<UNITY\\>|\\<NINTH\\>|\\<NINETY\\>|\\<NINETEY\\>|\\<NINETIETH\\>|\\<NINTY\\>","9",x)
x<-gsub("\\<FRIST\\>|\\<FIST\\>|\\<FRST\\>|\\<FIRST\\>|\\<ONE\\>","1",x)
x<-gsub("\\<SECOND\\>|\\<SECORD\\>|\\<SCOND\\>|\\<SECOND\\>|\\<TWO\\>","2",x)
x<-gsub("\\<THRID\\>|\\<THIRD\\>|\\<TIRD\\>|\\<TRIHD\\>|\\<THREE\\>","3",x)
x<-gsub("\\<FORTH\\>|\\<FOURTH\\>|\\<FROTH\\>|\\<FROUTH\\>|\\<FOUR\\>","4",x)
x<-gsub("\\<FIFETH\\>|\\<FIFTH\\>|\\<FIFFTH\\>|\\<FIFTHE\\>|\\<FIVE\\>","5",x)
x<-gsub("\\<SIXTH\\>|\\<SXTH\\>|\\<SITH\\>|\\<SIHXT\\>|\\<SIX\\>","6",x)
x<-gsub("\\<SEVENTH\\>|\\<SVEN\\>|\\<SVENTH\\>|\\<SEVENH\\>|\\<SEVENT\\>|\\<SEVEN\\>","7",x)
x<-gsub("\\<EIGHTH\\>|\\<EIGHTEH\\>|\\<EITH\\>|\\<EIGHT\\>","8",x)
x<-gsub("\\<NINETH\\>|\\<NINTH\\>|\\<NINT\\>|\\<NINETH\\>|\\<NINE\\>|\\<NIN\\>","9",x)
x<-gsub("\\<TWENTIETH\\>|\\<TWENTIEFTH\\>","20",x) #NEW
x<-gsub("\\<THIRTIETH\\>|\\<THIRTIEFTH\\>","30",x)
x<-gsub("\\<FORTIETH\\>|\\<FOURTIETH\\>","40",x)
x<-gsub("\\<FIFTIETH\\>","50",x)
x<-gsub("\\<SIXTIETH\\>","60",x)
x<-gsub("\\<SEVENTIETH\\>","70",x)
x<-gsub("\\<EIGHTIETH\\>","80",x)
x<-gsub("\\<NINETIETH\\>|\\<NINTIETH\\>","90",x)
x<-gsub("(?<=\\d) (?=\\d)","",x,perl = T) #new close gaps between all numbers
## place names
  ##x<-gsub("\\bSTR\\b","", x)
  x<-gsub("^\\bST\\b","SAINT", x) 
  x<-gsub("\\bHOUSE\\b","", x)
  x<-gsub("\\bHOSTEL\\b","", x)
  x<-gsub("\\bHOTEL\\b","", x)
  x<-gsub("\\bLODGE\\b","", x)
  x<-gsub("\\bLODGING\\b","", x)
  x<-trimws(x, "both")
  x<-gsub("\\<N\\>","NORTH",x)
  ##x<-gsub("\\<ST\\>","",x)
  ##x<-gsub("\\<STREET\\>","",x)
} 

MN

# clean strings separately
morse_mn1910[ , -1] <- apply(morse_mn1910[ , -1], 2, str_clean_streets)
mn_original[ , -1] <- apply(mn_original[ , -1], 2, str_clean_streets)
#colnames(morse_mn1910) <- 
#write_csv(morse_mn1910, "morse_mn1910.csv")
#write_csv(mn_original, "geo_mn1910.csv")
# join cleaned strings 
combined_edict_mn<-left_join(morse_mn1910,mn_original,by="ED")
# remove duplicates
combined_edict_mn[ , -1] %>% rowwise() %>%
  do(data.frame(., unique(.)))

|====                                                            |  8% ~24 s remaining    
|=====                                                           |  8% ~24 s remaining    
|=====                                                           |  8% ~24 s remaining    
|=====                                                           |  8% ~24 s remaining    
|=====                                                           |  9% ~24 s remaining    
|=====                                                           |  9% ~24 s remaining    
|=====                                                           |  9% ~23 s remaining    
|=====                                                           |  9% ~23 s remaining    
|======                                                          | 10% ~23 s remaining    
|======                                                          | 10% ~23 s remaining    
|======                                                          | 10% ~23 s remaining    
|======                                                          | 10% ~23 s remaining    
|======                                                          | 11% ~23 s remaining    
|======                                                          | 11% ~23 s remaining    
|======                                                          | 11% ~23 s remaining    
|=======                                                         | 11% ~23 s remaining    
|=======                                                         | 11% ~23 s remaining    
|=======                                                         | 12% ~23 s remaining    
|=======                                                         | 12% ~23 s remaining    
|=======                                                         | 12% ~22 s remaining    
|=======                                                         | 12% ~22 s remaining    
|=======                                                         | 12% ~22 s remaining    
|========                                                        | 13% ~22 s remaining    
|========                                                        | 13% ~22 s remaining    
|========                                                        | 13% ~22 s remaining    
|========                                                        | 14% ~22 s remaining    
|========                                                        | 14% ~22 s remaining    
|========                                                        | 14% ~22 s remaining    
|=========                                                       | 14% ~21 s remaining    
|=========                                                       | 15% ~21 s remaining    
|=========                                                       | 15% ~21 s remaining    
|=========                                                       | 15% ~21 s remaining    
|=========                                                       | 15% ~21 s remaining    
|=========                                                       | 15% ~21 s remaining    
|==========                                                      | 16% ~21 s remaining    
|==========                                                      | 16% ~21 s remaining    
|==========                                                      | 16% ~21 s remaining    
|==========                                                      | 16% ~21 s remaining    
|==========                                                      | 17% ~21 s remaining    
|==========                                                      | 17% ~21 s remaining    
|==========                                                      | 17% ~21 s remaining    
|===========                                                     | 17% ~20 s remaining    
|===========                                                     | 18% ~20 s remaining    
|===========                                                     | 18% ~20 s remaining    
|===========                                                     | 18% ~20 s remaining    
|===========                                                     | 18% ~20 s remaining    
|===========                                                     | 18% ~20 s remaining    
|===========                                                     | 19% ~20 s remaining    
|============                                                    | 19% ~20 s remaining    
|============                                                    | 19% ~20 s remaining    
|============                                                    | 19% ~20 s remaining    
|============                                                    | 20% ~20 s remaining    
|============                                                    | 20% ~20 s remaining    
|============                                                    | 20% ~20 s remaining    
|=============                                                   | 20% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 22% ~19 s remaining    
|=============                                                   | 22% ~19 s remaining    
|==============                                                  | 22% ~19 s remaining    
|==============                                                  | 22% ~19 s remaining    
|==============                                                  | 23% ~19 s remaining    
|==============                                                  | 23% ~19 s remaining    
|==============                                                  | 23% ~19 s remaining    
|==============                                                  | 23% ~19 s remaining    
|===============                                                 | 24% ~19 s remaining    
|===============                                                 | 24% ~19 s remaining    
|===============                                                 | 24% ~19 s remaining    
|===============                                                 | 24% ~19 s remaining    
|===============                                                 | 24% ~19 s remaining    
|===============                                                 | 25% ~19 s remaining    
|===============                                                 | 25% ~19 s remaining    
|================                                                | 25% ~18 s remaining    
|================                                                | 26% ~18 s remaining    
|================                                                | 26% ~18 s remaining    
|================                                                | 26% ~18 s remaining    
|================                                                | 26% ~18 s remaining    
|================                                                | 27% ~18 s remaining    
|=================                                               | 27% ~18 s remaining    
|=================                                               | 27% ~18 s remaining    
|=================                                               | 27% ~18 s remaining    
|=================                                               | 27% ~18 s remaining    
|=================                                               | 28% ~18 s remaining    
|=================                                               | 28% ~18 s remaining    
|=================                                               | 28% ~18 s remaining    
|==================                                              | 28% ~18 s remaining    
|==================                                              | 28% ~18 s remaining    
|==================                                              | 29% ~18 s remaining    
|==================                                              | 29% ~18 s remaining    
|==================                                              | 29% ~17 s remaining    
|==================                                              | 29% ~17 s remaining    
|===================                                             | 30% ~17 s remaining    
|===================                                             | 30% ~17 s remaining    
|===================                                             | 30% ~17 s remaining    
|===================                                             | 30% ~17 s remaining    
|===================                                             | 31% ~17 s remaining    
|===================                                             | 31% ~17 s remaining    
|===================                                             | 31% ~17 s remaining    
|====================                                            | 31% ~17 s remaining    
|====================                                            | 32% ~17 s remaining    
|====================                                            | 32% ~17 s remaining    
|====================                                            | 32% ~17 s remaining    
|====================                                            | 32% ~17 s remaining    
|====================                                            | 33% ~17 s remaining    
|====================                                            | 33% ~17 s remaining    
|=====================                                           | 33% ~17 s remaining    
|=====================                                           | 33% ~16 s remaining    
|=====================                                           | 34% ~16 s remaining    
|=====================                                           | 34% ~16 s remaining    
|=====================                                           | 34% ~16 s remaining    
|=====================                                           | 34% ~16 s remaining    
|======================                                          | 34% ~16 s remaining    
|======================                                          | 35% ~16 s remaining    
|======================                                          | 35% ~16 s remaining    
|======================                                          | 35% ~16 s remaining    
|======================                                          | 35% ~16 s remaining    
|======================                                          | 36% ~16 s remaining    
|======================                                          | 36% ~16 s remaining    
|=======================                                         | 36% ~16 s remaining    
|=======================                                         | 36% ~16 s remaining    
|=======================                                         | 36% ~16 s remaining    
|=======================                                         | 37% ~16 s remaining    
|=======================                                         | 37% ~16 s remaining    
|=======================                                         | 37% ~16 s remaining    
|=======================                                         | 37% ~15 s remaining    
|========================                                        | 38% ~15 s remaining    
|========================                                        | 38% ~15 s remaining    
|========================                                        | 38% ~15 s remaining    
|========================                                        | 38% ~15 s remaining    
|========================                                        | 39% ~15 s remaining    
|========================                                        | 39% ~15 s remaining    
|=========================                                       | 39% ~15 s remaining    
|=========================                                       | 39% ~15 s remaining    
|=========================                                       | 40% ~15 s remaining    
|=========================                                       | 40% ~15 s remaining    
|=========================                                       | 40% ~15 s remaining    
|=========================                                       | 40% ~15 s remaining    
|=========================                                       | 41% ~15 s remaining    
|==========================                                      | 41% ~15 s remaining    
|==========================                                      | 41% ~15 s remaining    
|==========================                                      | 41% ~15 s remaining    
|==========================                                      | 41% ~14 s remaining    
|==========================                                      | 42% ~14 s remaining    
|==========================                                      | 42% ~14 s remaining    
|===========================                                     | 42% ~14 s remaining    
|===========================                                     | 43% ~14 s remaining    
|===========================                                     | 43% ~14 s remaining    
|===========================                                     | 43% ~14 s remaining    
|===========================                                     | 43% ~14 s remaining    
|===========================                                     | 43% ~14 s remaining    
|===========================                                     | 44% ~14 s remaining    
|============================                                    | 44% ~14 s remaining    
|============================                                    | 44% ~14 s remaining    
|============================                                    | 44% ~14 s remaining    
|============================                                    | 45% ~14 s remaining    
|============================                                    | 45% ~14 s remaining    
|============================                                    | 45% ~14 s remaining    
|=============================                                   | 45% ~14 s remaining    
|=============================                                   | 46% ~14 s remaining    
|=============================                                   | 46% ~14 s remaining    
|=============================                                   | 46% ~13 s remaining    
|=============================                                   | 46% ~13 s remaining    
|=============================                                   | 46% ~13 s remaining    
|=============================                                   | 47% ~13 s remaining    
|==============================                                  | 47% ~13 s remaining    
|==============================                                  | 47% ~13 s remaining    
|==============================                                  | 47% ~13 s remaining    
|==============================                                  | 48% ~13 s remaining    
|==============================                                  | 48% ~13 s remaining    
|==============================                                  | 48% ~13 s remaining    
|===============================                                 | 49% ~13 s remaining    
|===============================                                 | 49% ~13 s remaining    
|===============================                                 | 49% ~13 s remaining    
|===============================                                 | 49% ~13 s remaining    
|===============================                                 | 50% ~13 s remaining    
|===============================                                 | 50% ~13 s remaining    
|================================                                | 50% ~13 s remaining    
|================================                                | 50% ~13 s remaining    
|================================                                | 51% ~12 s remaining    
|================================                                | 51% ~12 s remaining    
|================================                                | 51% ~12 s remaining    
|================================                                | 51% ~12 s remaining    
|=================================                               | 52% ~12 s remaining    
|=================================                               | 52% ~12 s remaining    
|=================================                               | 52% ~12 s remaining    
|=================================                               | 52% ~12 s remaining    
|=================================                               | 53% ~12 s remaining    
|=================================                               | 53% ~12 s remaining    
|==================================                              | 53% ~12 s remaining    
|==================================                              | 53% ~12 s remaining    
|==================================                              | 54% ~12 s remaining    
|==================================                              | 54% ~11 s remaining    
|==================================                              | 54% ~11 s remaining    
|==================================                              | 55% ~11 s remaining    
|===================================                             | 55% ~11 s remaining    
|===================================                             | 55% ~11 s remaining    
|===================================                             | 55% ~11 s remaining    
|===================================                             | 55% ~11 s remaining    
|===================================                             | 56% ~11 s remaining    
|===================================                             | 56% ~11 s remaining    
|====================================                            | 56% ~11 s remaining    
|====================================                            | 57% ~11 s remaining    
|====================================                            | 57% ~11 s remaining    
|====================================                            | 57% ~11 s remaining    
|====================================                            | 57% ~11 s remaining    
|====================================                            | 58% ~11 s remaining    
|=====================================                           | 58% ~10 s remaining    
|=====================================                           | 58% ~10 s remaining    
|=====================================                           | 58% ~10 s remaining    
|=====================================                           | 59% ~10 s remaining    
|=====================================                           | 59% ~10 s remaining    
|=====================================                           | 59% ~10 s remaining    
|======================================                          | 59% ~10 s remaining    
|======================================                          | 60% ~10 s remaining    
|======================================                          | 60% ~10 s remaining    
|======================================                          | 60% ~10 s remaining    
|======================================                          | 60% ~10 s remaining    
|======================================                          | 61% ~10 s remaining    
|=======================================                         | 61% ~10 s remaining    
|=======================================                         | 61% ~10 s remaining    
|=======================================                         | 61% ~10 s remaining    
|=======================================                         | 62% ~9 s remaining     
|=======================================                         | 62% ~9 s remaining     
|=======================================                         | 62% ~9 s remaining     
|=======================================                         | 62% ~9 s remaining     
|========================================                        | 63% ~9 s remaining     
|========================================                        | 63% ~9 s remaining     
|========================================                        | 63% ~9 s remaining     
|========================================                        | 63% ~9 s remaining     
|========================================                        | 64% ~9 s remaining     
|========================================                        | 64% ~9 s remaining     
|=========================================                       | 64% ~9 s remaining     
|=========================================                       | 64% ~9 s remaining     
|=========================================                       | 65% ~9 s remaining     
|=========================================                       | 65% ~9 s remaining     
|=========================================                       | 65% ~9 s remaining     
|=========================================                       | 65% ~8 s remaining     
|==========================================                      | 66% ~8 s remaining     
|==========================================                      | 66% ~8 s remaining     
|==========================================                      | 66% ~8 s remaining     
|==========================================                      | 66% ~8 s remaining     
|==========================================                      | 67% ~8 s remaining     
|==========================================                      | 67% ~8 s remaining     
|===========================================                     | 67% ~8 s remaining     
|===========================================                     | 68% ~8 s remaining     
|===========================================                     | 68% ~8 s remaining     
|===========================================                     | 68% ~8 s remaining     
|===========================================                     | 68% ~8 s remaining     
|===========================================                     | 69% ~8 s remaining     
|============================================                    | 69% ~8 s remaining     
|============================================                    | 69% ~8 s remaining     
|============================================                    | 69% ~7 s remaining     
|============================================                    | 70% ~7 s remaining     
|============================================                    | 70% ~7 s remaining     
|============================================                    | 70% ~7 s remaining     
|=============================================                   | 70% ~7 s remaining     
|=============================================                   | 71% ~7 s remaining     
|=============================================                   | 71% ~7 s remaining     
|=============================================                   | 71% ~7 s remaining     
|=============================================                   | 71% ~7 s remaining     
|=============================================                   | 72% ~7 s remaining     
|==============================================                  | 72% ~7 s remaining     
|==============================================                  | 72% ~7 s remaining     
|==============================================                  | 72% ~7 s remaining     
|==============================================                  | 73% ~7 s remaining     
|==============================================                  | 73% ~7 s remaining     
|==============================================                  | 73% ~7 s remaining     
|===============================================                 | 74% ~6 s remaining     
|===============================================                 | 74% ~6 s remaining     
|===============================================                 | 74% ~6 s remaining     
|===============================================                 | 74% ~6 s remaining     
|===============================================                 | 75% ~6 s remaining     
|===============================================                 | 75% ~6 s remaining     
|================================================                | 75% ~6 s remaining     
|================================================                | 75% ~6 s remaining     
|================================================                | 76% ~6 s remaining     
|================================================                | 76% ~6 s remaining     
|================================================                | 76% ~6 s remaining     
|================================================                | 76% ~6 s remaining     
|=================================================               | 77% ~6 s remaining     
|=================================================               | 77% ~6 s remaining     
|=================================================               | 77% ~6 s remaining     
|=================================================               | 77% ~6 s remaining     
|=================================================               | 78% ~5 s remaining     
|=================================================               | 78% ~5 s remaining     
|==================================================              | 78% ~5 s remaining     
|==================================================              | 78% ~5 s remaining     
|==================================================              | 79% ~5 s remaining     
|==================================================              | 79% ~5 s remaining     
|==================================================              | 79% ~5 s remaining     
|==================================================              | 79% ~5 s remaining     
|===================================================             | 80% ~5 s remaining     
|===================================================             | 80% ~5 s remaining     
|===================================================             | 80% ~5 s remaining     
|===================================================             | 81% ~5 s remaining     
|===================================================             | 81% ~5 s remaining     
|===================================================             | 81% ~5 s remaining     
|====================================================            | 81% ~5 s remaining     
|====================================================            | 82% ~4 s remaining     
|====================================================            | 82% ~4 s remaining     
|====================================================            | 82% ~4 s remaining     
|====================================================            | 82% ~4 s remaining     
|====================================================            | 83% ~4 s remaining     
|====================================================            | 83% ~4 s remaining     
|=====================================================           | 83% ~4 s remaining     
|=====================================================           | 83% ~4 s remaining     
|=====================================================           | 84% ~4 s remaining     
|=====================================================           | 84% ~4 s remaining     
|=====================================================           | 84% ~4 s remaining     
|=====================================================           | 84% ~4 s remaining     
|======================================================          | 85% ~4 s remaining     
|======================================================          | 85% ~4 s remaining     
|======================================================          | 85% ~4 s remaining     
|======================================================          | 85% ~4 s remaining     
|======================================================          | 86% ~3 s remaining     
|=======================================================         | 86% ~3 s remaining     
|=======================================================         | 86% ~3 s remaining     
|=======================================================         | 86% ~3 s remaining     
|=======================================================         | 87% ~3 s remaining     
|=======================================================         | 87% ~3 s remaining     
|=======================================================         | 87% ~3 s remaining     
|=======================================================         | 87% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 89% ~3 s remaining     
|========================================================        | 89% ~3 s remaining     
|=========================================================       | 89% ~3 s remaining     
|=========================================================       | 89% ~3 s remaining     
|=========================================================       | 90% ~2 s remaining     
|=========================================================       | 90% ~2 s remaining     
|=========================================================       | 90% ~2 s remaining     
|=========================================================       | 90% ~2 s remaining     
|==========================================================      | 91% ~2 s remaining     
|==========================================================      | 91% ~2 s remaining     
|==========================================================      | 91% ~2 s remaining     
|==========================================================      | 91% ~2 s remaining     
|==========================================================      | 92% ~2 s remaining     
|==========================================================      | 92% ~2 s remaining     
|==========================================================      | 92% ~2 s remaining     
|===========================================================     | 92% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 94% ~2 s remaining     
|============================================================    | 94% ~1 s remaining     
|============================================================    | 94% ~1 s remaining     
|============================================================    | 94% ~1 s remaining     
|============================================================    | 94% ~1 s remaining     
|============================================================    | 95% ~1 s remaining     
|============================================================    | 95% ~1 s remaining     
|============================================================    | 95% ~1 s remaining     
|=============================================================   | 95% ~1 s remaining     
|=============================================================   | 96% ~1 s remaining     
|=============================================================   | 96% ~1 s remaining     
|=============================================================   | 96% ~1 s remaining     
|=============================================================   | 97% ~1 s remaining     
|=============================================================   | 97% ~1 s remaining     
|==============================================================  | 97% ~1 s remaining     
|==============================================================  | 97% ~1 s remaining     
|==============================================================  | 98% ~1 s remaining     
|==============================================================  | 98% ~1 s remaining     
|==============================================================  | 98% ~0 s remaining     
|=============================================================== | 98% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== |100% ~0 s remaining     
|================================================================|100% ~0 s remaining     
#write_csv(combined_edict_mn, "combined_edict_mn.csv")
# join with markers
a <- morse_mn1910 
b <- mn_original 

a[is.na(a)] <- "ABCDNN"
b[is.na(b)] <- "ABCDNN"

a[ , -1][] <- lapply(a[ , -1], function(x) paste(x, "[M]", sep=" ")) 
b[ , -1][] <- lapply(b[ , -1], function(x) paste(x, "[G]", sep=" "))

a$ED <- as.character(a$ED)


c <- left_join(a, b, by= "ED")
c[c == "ABCDNN [M]"] <- NA
c[c == "ABCDNN [G]"] <- NA
combined_marker_mn <- c
#write_csv(combined_marker_mn, "combined_marker_mn.csv")

BK

# clean strings separately
morse_bk1910[ , -1] <- apply(morse_bk1910[ , -1], 2, str_clean_streets)
bk_original[ , -1] <- apply(bk_original[ , -1], 2, str_clean_streets)
#write_csv(morse_bk1910, "morse_bk1910.csv")
#write_csv(bk_original, "geo_bk1910.csv")
# join cleaned strings 
combined_edict_bk <- left_join(morse_bk1910,bk_original,by="ED")
# remove duplicates
combined_edict_bk[ , -1] %>% rowwise() %>%
  do(data.frame(., unique(.)))

|=====                                                           |  8% ~23 s remaining    
|=====                                                           |  8% ~23 s remaining    
|=====                                                           |  8% ~23 s remaining    
|=====                                                           |  9% ~23 s remaining    
|=====                                                           |  9% ~23 s remaining    
|=====                                                           |  9% ~23 s remaining    
|=====                                                           |  9% ~23 s remaining    
|======                                                          | 10% ~23 s remaining    
|======                                                          | 10% ~23 s remaining    
|======                                                          | 10% ~23 s remaining    
|======                                                          | 10% ~23 s remaining    
|======                                                          | 11% ~23 s remaining    
|======                                                          | 11% ~23 s remaining    
|=======                                                         | 11% ~23 s remaining    
|=======                                                         | 11% ~23 s remaining    
|=======                                                         | 11% ~23 s remaining    
|=======                                                         | 12% ~23 s remaining    
|=======                                                         | 12% ~23 s remaining    
|=======                                                         | 12% ~23 s remaining    
|=======                                                         | 12% ~22 s remaining    
|========                                                        | 13% ~22 s remaining    
|========                                                        | 13% ~22 s remaining    
|========                                                        | 13% ~22 s remaining    
|========                                                        | 13% ~22 s remaining    
|========                                                        | 14% ~22 s remaining    
|========                                                        | 14% ~22 s remaining    
|=========                                                       | 14% ~22 s remaining    
|=========                                                       | 15% ~22 s remaining    
|=========                                                       | 15% ~22 s remaining    
|=========                                                       | 15% ~22 s remaining    
|=========                                                       | 15% ~22 s remaining    
|==========                                                      | 16% ~22 s remaining    
|==========                                                      | 16% ~21 s remaining    
|==========                                                      | 16% ~21 s remaining    
|==========                                                      | 16% ~21 s remaining    
|==========                                                      | 17% ~21 s remaining    
|==========                                                      | 17% ~21 s remaining    
|===========                                                     | 17% ~21 s remaining    
|===========                                                     | 18% ~21 s remaining    
|===========                                                     | 18% ~21 s remaining    
|===========                                                     | 18% ~21 s remaining    
|===========                                                     | 18% ~21 s remaining    
|===========                                                     | 19% ~21 s remaining    
|============                                                    | 19% ~21 s remaining    
|============                                                    | 19% ~21 s remaining    
|============                                                    | 19% ~21 s remaining    
|============                                                    | 20% ~20 s remaining    
|============                                                    | 20% ~20 s remaining    
|============                                                    | 20% ~20 s remaining    
|=============                                                   | 20% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 21% ~20 s remaining    
|=============                                                   | 22% ~20 s remaining    
|==============                                                  | 22% ~20 s remaining    
|==============                                                  | 22% ~20 s remaining    
|==============                                                  | 22% ~20 s remaining    
|==============                                                  | 23% ~20 s remaining    
|==============                                                  | 23% ~20 s remaining    
|==============                                                  | 23% ~20 s remaining    
|==============                                                  | 23% ~20 s remaining    
|===============                                                 | 23% ~20 s remaining    
|===============                                                 | 24% ~20 s remaining    
|===============                                                 | 24% ~20 s remaining    
|===============                                                 | 24% ~20 s remaining    
|===============                                                 | 25% ~19 s remaining    
|===============                                                 | 25% ~19 s remaining    
|===============                                                 | 25% ~19 s remaining    
|================                                                | 25% ~19 s remaining    
|================                                                | 26% ~19 s remaining    
|================                                                | 26% ~19 s remaining    
|================                                                | 26% ~19 s remaining    
|================                                                | 26% ~19 s remaining    
|================                                                | 26% ~19 s remaining    
|=================                                               | 27% ~19 s remaining    
|=================                                               | 27% ~19 s remaining    
|=================                                               | 27% ~19 s remaining    
|=================                                               | 27% ~19 s remaining    
|=================                                               | 28% ~19 s remaining    
|=================                                               | 28% ~19 s remaining    
|==================                                              | 28% ~18 s remaining    
|==================                                              | 28% ~18 s remaining    
|==================                                              | 29% ~18 s remaining    
|==================                                              | 29% ~18 s remaining    
|==================                                              | 29% ~18 s remaining    
|==================                                              | 29% ~18 s remaining    
|==================                                              | 30% ~18 s remaining    
|===================                                             | 30% ~18 s remaining    
|===================                                             | 30% ~18 s remaining    
|===================                                             | 30% ~18 s remaining    
|===================                                             | 31% ~18 s remaining    
|===================                                             | 31% ~18 s remaining    
|===================                                             | 31% ~18 s remaining    
|====================                                            | 31% ~18 s remaining    
|====================                                            | 32% ~18 s remaining    
|====================                                            | 32% ~18 s remaining    
|====================                                            | 32% ~17 s remaining    
|====================                                            | 32% ~17 s remaining    
|====================                                            | 33% ~17 s remaining    
|=====================                                           | 33% ~17 s remaining    
|=====================                                           | 33% ~17 s remaining    
|=====================                                           | 33% ~17 s remaining    
|=====================                                           | 34% ~17 s remaining    
|=====================                                           | 34% ~17 s remaining    
|=====================                                           | 34% ~17 s remaining    
|=====================                                           | 34% ~17 s remaining    
|======================                                          | 35% ~17 s remaining    
|======================                                          | 35% ~17 s remaining    
|======================                                          | 35% ~17 s remaining    
|======================                                          | 35% ~17 s remaining    
|======================                                          | 36% ~17 s remaining    
|======================                                          | 36% ~17 s remaining    
|=======================                                         | 36% ~17 s remaining    
|=======================                                         | 36% ~16 s remaining    
|=======================                                         | 36% ~16 s remaining    
|=======================                                         | 37% ~16 s remaining    
|=======================                                         | 37% ~16 s remaining    
|=======================                                         | 37% ~16 s remaining    
|=======================                                         | 37% ~16 s remaining    
|========================                                        | 38% ~16 s remaining    
|========================                                        | 38% ~16 s remaining    
|========================                                        | 38% ~16 s remaining    
|========================                                        | 38% ~16 s remaining    
|========================                                        | 39% ~16 s remaining    
|========================                                        | 39% ~16 s remaining    
|=========================                                       | 39% ~16 s remaining    
|=========================                                       | 39% ~16 s remaining    
|=========================                                       | 40% ~16 s remaining    
|=========================                                       | 40% ~16 s remaining    
|=========================                                       | 40% ~16 s remaining    
|=========================                                       | 40% ~16 s remaining    
|=========================                                       | 41% ~15 s remaining    
|==========================                                      | 41% ~15 s remaining    
|==========================                                      | 41% ~15 s remaining    
|==========================                                      | 41% ~15 s remaining    
|==========================                                      | 42% ~15 s remaining    
|==========================                                      | 42% ~15 s remaining    
|==========================                                      | 42% ~15 s remaining    
|===========================                                     | 42% ~15 s remaining    
|===========================                                     | 42% ~15 s remaining    
|===========================                                     | 43% ~15 s remaining    
|===========================                                     | 43% ~15 s remaining    
|===========================                                     | 43% ~15 s remaining    
|===========================                                     | 43% ~15 s remaining    
|============================                                    | 44% ~15 s remaining    
|============================                                    | 44% ~15 s remaining    
|============================                                    | 44% ~15 s remaining    
|============================                                    | 44% ~14 s remaining    
|============================                                    | 45% ~14 s remaining    
|============================                                    | 45% ~14 s remaining    
|============================                                    | 45% ~14 s remaining    
|============================                                    | 45% ~15 s remaining    
|=============================                                   | 45% ~14 s remaining    
|=============================                                   | 46% ~14 s remaining    
|=============================                                   | 46% ~14 s remaining    
|=============================                                   | 46% ~14 s remaining    
|=============================                                   | 47% ~14 s remaining    
|=============================                                   | 47% ~14 s remaining    
|==============================                                  | 47% ~14 s remaining    
|==============================                                  | 47% ~14 s remaining    
|==============================                                  | 48% ~14 s remaining    
|==============================                                  | 48% ~14 s remaining    
|==============================                                  | 48% ~14 s remaining    
|==============================                                  | 48% ~14 s remaining    
|===============================                                 | 49% ~14 s remaining    
|===============================                                 | 49% ~14 s remaining    
|===============================                                 | 49% ~13 s remaining    
|===============================                                 | 49% ~13 s remaining    
|===============================                                 | 50% ~13 s remaining    
|===============================                                 | 50% ~13 s remaining    
|================================                                | 50% ~13 s remaining    
|================================                                | 50% ~13 s remaining    
|================================                                | 51% ~13 s remaining    
|================================                                | 51% ~13 s remaining    
|================================                                | 51% ~13 s remaining    
|================================                                | 51% ~13 s remaining    
|=================================                               | 52% ~13 s remaining    
|=================================                               | 52% ~13 s remaining    
|=================================                               | 52% ~13 s remaining    
|=================================                               | 52% ~13 s remaining    
|=================================                               | 53% ~12 s remaining    
|=================================                               | 53% ~12 s remaining    
|=================================                               | 53% ~12 s remaining    
|==================================                              | 53% ~12 s remaining    
|==================================                              | 54% ~12 s remaining    
|==================================                              | 54% ~12 s remaining    
|==================================                              | 54% ~12 s remaining    
|==================================                              | 54% ~12 s remaining    
|==================================                              | 55% ~12 s remaining    
|===================================                             | 55% ~12 s remaining    
|===================================                             | 55% ~12 s remaining    
|===================================                             | 55% ~12 s remaining    
|===================================                             | 56% ~12 s remaining    
|===================================                             | 56% ~12 s remaining    
|===================================                             | 56% ~12 s remaining    
|====================================                            | 56% ~11 s remaining    
|====================================                            | 57% ~11 s remaining    
|====================================                            | 57% ~11 s remaining    
|====================================                            | 57% ~11 s remaining    
|====================================                            | 57% ~11 s remaining    
|====================================                            | 58% ~11 s remaining    
|=====================================                           | 58% ~11 s remaining    
|=====================================                           | 58% ~11 s remaining    
|=====================================                           | 58% ~11 s remaining    
|=====================================                           | 59% ~11 s remaining    
|=====================================                           | 59% ~11 s remaining    
|=====================================                           | 59% ~11 s remaining    
|=====================================                           | 59% ~11 s remaining    
|======================================                          | 59% ~11 s remaining    
|======================================                          | 60% ~11 s remaining    
|======================================                          | 60% ~10 s remaining    
|======================================                          | 60% ~10 s remaining    
|======================================                          | 61% ~10 s remaining    
|======================================                          | 61% ~10 s remaining    
|======================================                          | 61% ~10 s remaining    
|=======================================                         | 61% ~10 s remaining    
|=======================================                         | 61% ~10 s remaining    
|=======================================                         | 62% ~10 s remaining    
|=======================================                         | 62% ~10 s remaining    
|=======================================                         | 62% ~10 s remaining    
|=======================================                         | 62% ~10 s remaining    
|========================================                        | 63% ~10 s remaining    
|========================================                        | 63% ~10 s remaining    
|========================================                        | 63% ~10 s remaining    
|========================================                        | 63% ~10 s remaining    
|========================================                        | 64% ~9 s remaining     
|========================================                        | 64% ~9 s remaining     
|=========================================                       | 64% ~9 s remaining     
|=========================================                       | 64% ~9 s remaining     
|=========================================                       | 65% ~9 s remaining     
|=========================================                       | 65% ~9 s remaining     
|=========================================                       | 65% ~9 s remaining     
|=========================================                       | 65% ~9 s remaining     
|==========================================                      | 66% ~9 s remaining     
|==========================================                      | 66% ~9 s remaining     
|==========================================                      | 66% ~9 s remaining     
|==========================================                      | 66% ~9 s remaining     
|==========================================                      | 67% ~9 s remaining     
|==========================================                      | 67% ~9 s remaining     
|===========================================                     | 67% ~9 s remaining     
|===========================================                     | 67% ~9 s remaining     
|===========================================                     | 68% ~8 s remaining     
|===========================================                     | 68% ~8 s remaining     
|===========================================                     | 68% ~8 s remaining     
|===========================================                     | 68% ~8 s remaining     
|===========================================                     | 69% ~8 s remaining     
|============================================                    | 69% ~8 s remaining     
|============================================                    | 69% ~8 s remaining     
|============================================                    | 69% ~8 s remaining     
|============================================                    | 70% ~8 s remaining     
|============================================                    | 70% ~8 s remaining     
|============================================                    | 70% ~8 s remaining     
|=============================================                   | 70% ~8 s remaining     
|=============================================                   | 71% ~8 s remaining     
|=============================================                   | 71% ~8 s remaining     
|=============================================                   | 71% ~8 s remaining     
|=============================================                   | 71% ~7 s remaining     
|=============================================                   | 72% ~7 s remaining     
|=============================================                   | 72% ~7 s remaining     
|==============================================                  | 72% ~7 s remaining     
|==============================================                  | 72% ~7 s remaining     
|==============================================                  | 72% ~7 s remaining     
|==============================================                  | 73% ~7 s remaining     
|==============================================                  | 73% ~7 s remaining     
|==============================================                  | 73% ~7 s remaining     
|==============================================                  | 73% ~7 s remaining     
|===============================================                 | 74% ~7 s remaining     
|===============================================                 | 74% ~7 s remaining     
|===============================================                 | 74% ~7 s remaining     
|===============================================                 | 74% ~7 s remaining     
|===============================================                 | 74% ~7 s remaining     
|===============================================                 | 75% ~7 s remaining     
|================================================                | 75% ~7 s remaining     
|================================================                | 75% ~7 s remaining     
|================================================                | 75% ~6 s remaining     
|================================================                | 76% ~6 s remaining     
|================================================                | 76% ~6 s remaining     
|================================================                | 76% ~6 s remaining     
|================================================                | 76% ~6 s remaining     
|=================================================               | 77% ~6 s remaining     
|=================================================               | 77% ~6 s remaining     
|=================================================               | 77% ~6 s remaining     
|=================================================               | 77% ~6 s remaining     
|=================================================               | 78% ~6 s remaining     
|=================================================               | 78% ~6 s remaining     
|=================================================               | 78% ~6 s remaining     
|==================================================              | 78% ~6 s remaining     
|==================================================              | 79% ~6 s remaining     
|==================================================              | 79% ~6 s remaining     
|==================================================              | 79% ~6 s remaining     
|==================================================              | 79% ~5 s remaining     
|==================================================              | 79% ~5 s remaining     
|===================================================             | 80% ~5 s remaining     
|===================================================             | 80% ~5 s remaining     
|===================================================             | 80% ~5 s remaining     
|===================================================             | 80% ~5 s remaining     
|===================================================             | 81% ~5 s remaining     
|===================================================             | 81% ~5 s remaining     
|===================================================             | 81% ~5 s remaining     
|====================================================            | 81% ~5 s remaining     
|====================================================            | 82% ~5 s remaining     
|====================================================            | 82% ~5 s remaining     
|====================================================            | 82% ~5 s remaining     
|====================================================            | 82% ~5 s remaining     
|====================================================            | 83% ~5 s remaining     
|=====================================================           | 83% ~5 s remaining     
|=====================================================           | 83% ~4 s remaining     
|=====================================================           | 83% ~4 s remaining     
|=====================================================           | 83% ~4 s remaining     
|=====================================================           | 84% ~4 s remaining     
|=====================================================           | 84% ~4 s remaining     
|=====================================================           | 84% ~4 s remaining     
|=====================================================           | 84% ~4 s remaining     
|======================================================          | 85% ~4 s remaining     
|======================================================          | 85% ~4 s remaining     
|======================================================          | 85% ~4 s remaining     
|======================================================          | 85% ~4 s remaining     
|======================================================          | 86% ~4 s remaining     
|======================================================          | 86% ~4 s remaining     
|======================================================          | 86% ~4 s remaining     
|=======================================================         | 86% ~4 s remaining     
|=======================================================         | 86% ~4 s remaining     
|=======================================================         | 87% ~4 s remaining     
|=======================================================         | 87% ~3 s remaining     
|=======================================================         | 87% ~3 s remaining     
|=======================================================         | 87% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 88% ~3 s remaining     
|========================================================        | 89% ~3 s remaining     
|========================================================        | 89% ~3 s remaining     
|========================================================        | 89% ~3 s remaining     
|=========================================================       | 89% ~3 s remaining     
|=========================================================       | 89% ~3 s remaining     
|=========================================================       | 90% ~3 s remaining     
|=========================================================       | 90% ~3 s remaining     
|=========================================================       | 90% ~3 s remaining     
|=========================================================       | 90% ~3 s remaining     
|=========================================================       | 90% ~3 s remaining     
|=========================================================       | 90% ~3 s remaining     
|==========================================================      | 91% ~2 s remaining     
|==========================================================      | 91% ~2 s remaining     
|==========================================================      | 91% ~2 s remaining     
|==========================================================      | 91% ~2 s remaining     
|==========================================================      | 92% ~2 s remaining     
|==========================================================      | 92% ~2 s remaining     
|==========================================================      | 92% ~2 s remaining     
|==========================================================      | 92% ~2 s remaining     
|===========================================================     | 92% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 93% ~2 s remaining     
|===========================================================     | 94% ~2 s remaining     
|===========================================================     | 94% ~2 s remaining     
|============================================================    | 94% ~2 s remaining     
|============================================================    | 94% ~2 s remaining     
|============================================================    | 94% ~2 s remaining     
|============================================================    | 94% ~1 s remaining     
|============================================================    | 95% ~1 s remaining     
|============================================================    | 95% ~1 s remaining     
|============================================================    | 95% ~1 s remaining     
|============================================================    | 95% ~1 s remaining     
|=============================================================   | 95% ~1 s remaining     
|=============================================================   | 96% ~1 s remaining     
|=============================================================   | 96% ~1 s remaining     
|=============================================================   | 96% ~1 s remaining     
|=============================================================   | 96% ~1 s remaining     
|=============================================================   | 96% ~1 s remaining     
|=============================================================   | 97% ~1 s remaining     
|=============================================================   | 97% ~1 s remaining     
|==============================================================  | 97% ~1 s remaining     
|==============================================================  | 97% ~1 s remaining     
|==============================================================  | 97% ~1 s remaining     
|==============================================================  | 98% ~1 s remaining     
|==============================================================  | 98% ~1 s remaining     
|==============================================================  | 98% ~0 s remaining     
|==============================================================  | 98% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== | 99% ~0 s remaining     
|=============================================================== |100% ~0 s remaining     
|=============================================================== |100% ~0 s remaining     
#write_csv(combined_edict_bk, "combined_edict_bk.csv")
# join with markers
aa <- morse_bk1910 
bb <- bk_original 

aa[is.na(aa)] <- "ABCDNN"
bb[is.na(bb)] <- "ABCDNN"

aa[ , -1][] <- lapply(aa[ , -1], function(x) paste(x, "[M]", sep=" ")) 
bb[ , -1][] <- lapply(bb[ , -1], function(x) paste(x, "[G]", sep=" "))

aa$ED <- as.character(aa$ED)

#b$ED <- as.numeric(as.character(b$ED))

cc <- left_join(aa, bb, by= "ED")
cc[cc == "ABCDNN [M]"] <- NA
cc[cc == "ABCDNN [G]"] <- NA
combined_marker_bk <- cc
#write_csv(combined_marker_bk, "combined_marker_bk.csv")
with(morse_mn1910, ED <- as.factor(ED))
LS0tCnRpdGxlOiAiT2N0MTAiCmF1dGhvcjogIkNoYW5nIFh1IgpkYXRlOiAiMTAvMTAvMjAxOSIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3IsIGluY2x1ZGU9RkFMU0V9CmtuaXRyOjpvcHRzX2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